<?php

namespace Product\Model;

use Zend\InputFilter\Factory as InputFactory; // <-- Add this import
use Zend\InputFilter\InputFilter; // <-- Add this import
use Zend\InputFilter\InputFilterAwareInterface; // <-- Add this import
use Zend\InputFilter\InputFilterInterface; // <-- Add this import
class Product // implements InputFilterAwareInterface
{
	public $id;
	public $name;
	public $description;
	public $quantity;
	public $type;
	public $pricefrequency;
	public $ownedsecurableitem_id;
	public $account_id;
	public $contact_id;
	public $opportunity_id;
	public $producttemplate_id;
	public $stage_customfield_id;
	public $sellprice_currencyvalue_id;
	public function exchangeArray($data) {
		$this->id = (isset ( $data ['id'] )) ? $data ['id'] : null;
		$this->name = (isset ( $data ['name'] )) ? $data ['name'] : null;
		$this->description = (isset ( $data ['description'] )) ? $data ['description'] : null;
		$this->quantity = (isset ( $data ['quantity'] )) ? $data ['quantity'] : null;
		$this->type = (isset ( $data ['type'] )) ? $data ['type'] : null;
		$this->pricefrequency = (isset ( $data ['pricefrequency'] )) ? $data ['pricefrequency'] : null;
		$this->ownedsecurableitem_id = (isset ( $data ['ownedsecurableitem_id'] )) ? $data ['ownedsecurableitem_id'] : null;
		$this->account_id = (isset ( $data ['account_id'] )) ? $data ['account_id'] : null;
		$this->contact_id = (isset ( $data ['contact_id'] )) ? $data ['contact_id'] : null;
		$this->opportunity_id = (isset ( $data ['opportunity_id'] )) ? $data ['opportunity_id'] : null;
		$this->producttemplate_id = (isset ( $data ['producttemplate_id'] )) ? $data ['producttemplate_id'] : null;
		$this->stage_customfield_id = (isset ( $data ['stage_customfield_id'] )) ? $data ['stage_customfield_id'] : null;
		$this->sellprice_currencyvalue_id = (isset ( $data ['sellprice_currencyvalue_id'] )) ? $data ['sellprice_currencyvalue_id'] : null;
	}
	public function __construct(array $options = null) {
		if (is_array ( $options )) {
			$this->setOptions ( $options );
		}
	}
	public function getArrayCopy() {
		return get_object_vars ( $this );
	}
	protected $inputFilter;
	public function setInputFilter(InputFilterInterface $inputFilter) {
		throw new \Exception ( "Not used" );
	}
	public function getInputFilter() {
		if (! $this->inputFilter) {
			$inputFilter = new InputFilter ();
			$factory = new InputFactory ();
			
			$inputFilter->add ( $factory->createInput ( array (
					'name' => 'name',
					'required' => true,
					'filters' => array (
							array (
									'name' => 'StripTags' 
							),
							array (
									'name' => 'StringTrim' 
							) 
					) 
			)
			 ) );
			
			$inputFilter->add ( $factory->createInput ( array (
					'name' => 'description',
					'required' => true,
					'filters' => array (
							array (
									'name' => 'StripTags' 
							),
							array (
									'name' => 'StringTrim' 
							) 
					) 
			)
			 ) );
			
			$inputFilter->add ( $factory->createInput ( array (
					'name' => 'quantity',
					'required' => true,
					'filters' => array (
							array (
									'name' => 'StripTags' 
							),
							array (
									'name' => 'StringTrim' 
							) 
					) 
			)
			 ) );
			
			$inputFilter->add ( $factory->createInput ( array (
					'name' => 'type',
					'required' => true,
					'filters' => array (
							array (
									'name' => 'StripTags' 
							),
							array (
									'name' => 'StringTrim' 
							) 
					) 
			)
			 ) );
			
			$inputFilter->add ( $factory->createInput ( array (
					'name' => 'pricefrequency',
					'required' => true,
					'filters' => array (
							array (
									'name' => 'StripTags' 
							),
							array (
									'name' => 'StringTrim' 
							) 
					) 
			)
			 ) );
			
			$inputFilter->add ( $factory->createInput ( array (
					'name' => 'ownedsecurableitem_id',
					'required' => true,
					'filters' => array (
							array (
									'name' => 'StripTags' 
							),
							array (
									'name' => 'StringTrim' 
							) 
					) 
			)
			 ) );
			
			$inputFilter->add ( $factory->createInput ( array (
					'name' => 'account_id',
					'required' => true,
					'filters' => array (
							array (
									'name' => 'StripTags' 
							),
							array (
									'name' => 'StringTrim' 
							) 
					) 
			)
			 ) );
			
			$inputFilter->add ( $factory->createInput ( array (
					'name' => 'contact_id',
					'required' => true,
					'filters' => array (
							array (
									'name' => 'StripTags' 
							),
							array (
									'name' => 'StringTrim' 
							) 
					) 
			)
			 ) );
			
			$inputFilter->add ( $factory->createInput ( array (
					'name' => 'opportunity_id',
					'required' => true,
					'filters' => array (
							array (
									'name' => 'StripTags' 
							),
							array (
									'name' => 'StringTrim' 
							) 
					) 
			)
			 ) );
			
			$inputFilter->add ( $factory->createInput ( array (
					'name' => 'producttemplate_id',
					'required' => true,
					'filters' => array (
							array (
									'name' => 'StripTags' 
							),
							array (
									'name' => 'StringTrim' 
							) 
					) 
			)
			 ) );
			
			$inputFilter->add ( $factory->createInput ( array (
					'name' => 'stage_customfield_id',
					'required' => true,
					'filters' => array (
							array (
									'name' => 'StripTags' 
							),
							array (
									'name' => 'StringTrim' 
							) 
					) 
			)
			 ) );
			
			$inputFilter->add ( $factory->createInput ( array (
					'name' => 'sellprice_currencyvalue_id',
					'required' => true,
					'filters' => array (
							array (
									'name' => 'StripTags' 
							),
							array (
									'name' => 'StringTrim' 
							) 
					) 
			)
			 ) );
			$this->inputFilter = $inputFilter;
		}
		
		return $this->inputFilter;
	}
}